package com.centit.flowNode.service.impl;

import java.util.Map;

import javax.annotation.Resource;
import javax.validation.constraints.NotNull;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Service;

import com.alibaba.fastjson.JSONArray;
import com.centit.flowNode.dao.FlowNodeDao;
import com.centit.flowNode.po.FlowNode;
import com.centit.flowNode.service.FlowNodeManager;
import com.centit.framework.jdbc.service.BaseEntityManagerImpl;
@Service
public class FlowNodeManagerImpl extends BaseEntityManagerImpl<FlowNode,java.lang.String,FlowNodeDao>
implements FlowNodeManager{
public static final Log log = LogFactory.getLog(FlowNodeManager.class);

	
	private FlowNodeDao flowNodeDao ;
	
	@Resource(name = "flowNodeDao")
    @NotNull
	public void setFlowNodeDao(FlowNodeDao baseDao)
	{
		this.flowNodeDao = baseDao;
		setBaseDao(this.flowNodeDao);
	}
	
	public Integer getMaxNum(String flowRecId) {
		return flowNodeDao.getMaxNum(flowRecId);
	}
	
	public void updateAllFlowNodeEnd(String flowRecId){
		flowNodeDao.updateAllFlowNodeEnd(flowRecId);
		
	}
	
	public void updateLastFlowNode(String flowRecId,String nodeNum,String userCode){
		flowNodeDao.updateLastFlowNode(flowRecId,nodeNum,userCode);
	}
	
	public JSONArray listFlowUserCodeByFlowRecId(Map<String,Object> map){
		return flowNodeDao.listFlowUserCodeByFlowRecId(map);
	}

	@Override
	public void updateFlowNodeStatus(String flowRecId, String userCode) {
		flowNodeDao.updateFlowNodeStatus(flowRecId, userCode);
		
	}
}
